package com.nineclock.system.controller;

import com.nineclock.common.entity.Result;
import com.nineclock.system.SysUserControllerApi;
import com.nineclock.system.dto.SysRegisterDTO;
import com.nineclock.system.service.SysCompanyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class SysUserController implements SysUserControllerApi {
    @Autowired
    SysCompanyUserService sysCompanyUserService;
    @Override
    @PostMapping("/register")
    public Result<Integer> addUser(SysRegisterDTO sysRegisterDTO) {
        Integer i=sysCompanyUserService.addUser(sysRegisterDTO);
        return Result.success(i);
    }
}
